// app/router/inventory_route.js
'use strict';

module.exports = app => {
  const { router, controller } = app;
  
  // 产品管理路由
  router.get('/api/v1/inventory/products', controller.inventoryController.getProducts);
  // 添加产品统计数据路由
  router.get('/api/v1/inventory/products/stats', controller.inventoryController.getProductStats);
  router.get('/api/v1/inventory/products/:id', controller.inventoryController.getProduct);
  router.post('/api/v1/inventory/products', controller.inventoryController.createProduct);
  router.put('/api/v1/inventory/products/:id', controller.inventoryController.updateProduct);
  router.delete('/api/v1/inventory/products/:id', controller.inventoryController.deleteProduct);
  // 添加复制产品路由
  router.post('/api/v1/inventory/products/:id/clone', controller.inventoryController.cloneProduct);
  router.post('/api/v1/inventory/products/batch-delete', controller.inventoryController.batchDeleteProducts);
  // 添加批量更新产品状态路由
  router.post('/api/v1/inventory/products/batch-update-status', controller.inventoryController.batchUpdateProductStatus);
  router.post('/api/v1/inventory/products/import', controller.inventoryController.importProducts);
  router.get('/api/v1/inventory/products/export', controller.inventoryController.exportProducts);
  
  // 库存调整相关路由
  router.post('/api/v1/inventory/adjustments', controller.inventoryController.adjustInventory);
  router.get('/api/v1/inventory/adjustments', controller.inventoryController.getInventoryAdjustments);
};